﻿using System.Xml;
using Ro.Common.RoInterface.UserType;

namespace Ro.Common.RoInterface.RoWebAction
{
    /// <summary>
    /// 接口定义
    /// 浏览器相关操作
    /// </summary>
    public interface IWebBrowserFunc
    {
        /// <summary>
        /// 浏览器回退
        /// </summary>
        /// <param name="sigNode">对应节点</param>
        /// <returns>返回操作</returns>
        WebActionResult WebBrowserBack(XmlNode sigNode);


        /// <summary>
        /// 浏览器页面（tab）关闭
        /// </summary>
        /// <param name="sigNode">对应节点</param>
        /// <returns>返回操作</returns>
        WebActionResult WebBrowserClose(XmlNode sigNode);


        /// <summary>
        /// 浏览器关闭窗口
        /// </summary>
        /// <param name="sigNode">对应节点</param>
        /// <returns>返回操作</returns>
        WebActionResult WebBrowserCloseTab(XmlNode sigNode);


        /// <summary>
        /// 浏览器执行JavaScript脚本
        /// </summary>
        /// <param name="sigNode">对应节点</param>
        /// <returns>返回操作</returns>
        WebActionResult WebBrowserExecuteScript(XmlNode sigNode);


        /// <summary>
        /// 浏览器前进
        /// </summary>
        /// <param name="sigNode">对应节点</param>
        /// <returns>返回操作</returns>
        WebActionResult WebBrowserForward(XmlNode sigNode);


        /// <summary>
        /// 浏览器进入某网址
        /// </summary>
        /// <param name="sigNode">对应节点</param>
        /// <returns>返回操作</returns>
        WebActionResult WebBrowserGoToUrl(XmlNode sigNode);


        /// <summary>
        /// 浏览器刷新
        /// </summary>
        /// <param name="sigNode">对应节点</param>
        /// <returns>返回操作</returns>
        WebActionResult WebBrowserRefresh(XmlNode sigNode);


        /// <summary>
        /// 浏览器强制停止刷新
        /// </summary>
        /// <param name="sigNode">对应节点</param>
        /// <returns>返回操作</returns>
        WebActionResult WebBrowserStop(XmlNode sigNode);


        /// <summary>
        /// 浏览器切换Frame
        /// </summary>
        /// <param name="sigNode">对应节点</param>
        /// <returns>返回操作</returns>
        WebActionResult WebBrowserSwitchFrame(XmlNode sigNode);


        /// <summary>
        /// 浏览器切换窗口(Tab)
        /// </summary>
        /// <param name="sigNode">对应节点</param>
        /// <returns>返回操作</returns>
        WebActionResult WebBrowserSwitchToTab(XmlNode sigNode);


        /// <summary>
        /// 浏览器截图
        /// </summary>
        /// <param name="sigNode">对应节点</param>
        /// <returns>返回操作</returns>
        WebActionResult WebBrowserTakeSnapshot(XmlNode sigNode);
    }
}